<?
define('BASEPATH', true);
include('../inc/config.php');
if($is_online){
  $sql = $db->Query("SELECT id,facebook,title,cpc FROM `facebook` WHERE (`active` = '0' AND `points` >= `cpc`) AND `id` NOT IN (SELECT `site_id` FROM `liked` WHERE `user_id`='".$data['id']."') ORDER BY `cpc` DESC LIMIT 5, 6");
  $site = $db->FetchArray($sql);
if($site['id'] != ""){
?>
<div class="tbl tbl-facebook" id="<?=$site['id']?>">
	<a href="#" class="close" onclick="skipElement('tbl','<?=$site['id']?>');">x</a>
	<div><iframe src="pages/fbt.php?url=<?=$site['id']?>" width="120" height="24" frameborder="0" allowtransparency="true" scrolling="no"></iframe></div>
	<div class="title"><a href="<?=$site['facebook']?>" target="_blank" style="color:blue;"><?=$site['title']?></a></div>
	<div class="points">Coins: <b><?=$site['cpc']?></b></div>
</div><?}}?>